home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 October / Macformat17.cdr / Shareware City / Developers / WASTETCL / WASTE TCL / CWASTEText.h < prev   
Encoding:
C/C++ Source or Header  |  1994-05-22  |  3.6 KB  |  112 lines  |  [TEXT/ALFA]

  1. /********************************************************\
  2.  CWASTEText.h
  3.  
  4. \********************************************************/
  5.  
  6. #pragma once
  7.  
  8. #include "CAbstractText.h"
  9. #include "WASTE.h"
  10.  
  11. class CWASTEText : public CAbstractText
  12. {
  13.     public:
  14.         
  15.         TCL_DECLARE_CLASS
  16.         
  17.         // data members
  18.         WEHandle     macWE;            // handle to WE data
  19.         long        spacingCmd;        // Line spacing command number
  20.         long        alignCmd;        // alignment cmd number
  21.             
  22.         // construction/destruction
  23.         CWASTEText();
  24.         CWASTEText(CView *anEnclosure, CBureaucrat *aSupervisor,
  25.             short aWidth = 0, short aHeight = 0, short aHEncl = 0,
  26.             short aVEncl = 0, SizingOption aHSizing = sizELASTIC,
  27.             SizingOption aVSizing = sizELASTIC, short aLineWidth = -1,
  28.             Boolean aScrollHoriz = FALSE);
  29.         
  30.         ~CWASTEText();
  31.  
  32.         void IWASTEText(CView *anEnclosure, CBureaucrat *aSupervisor,
  33.                             short aWidth, short aHeight,
  34.                             short aHEncl, short aVEncl,
  35.                             SizingOption aHSizing, SizingOption aVSizing,
  36.                             short aLineWidth);
  37.         virtual void IViewTemp(CView *anEnclosure, CBureaucrat *aSupervisor,
  38.                             Ptr viewData);
  39.         void IWASTETextX();
  40.  
  41.         // Mouse and Keystrokes
  42.         virtual void DoClick(Point hitPt, short modifierKeys, long when);
  43.         virtual void PerformEditCommand(long theCommand);
  44.  
  45.         // Display
  46.         virtual void        Draw(Rect *area);
  47.         virtual void        Scroll(long hDelta, long vDelta, Boolean redraw);
  48.         virtual void        Activate();
  49.         virtual void        Deactivate();
  50.         virtual void        SetSelection(long selStart, long selEnd, Boolean fRedraw);
  51.         
  52.         // Text Specification
  53.         void Clear(void);
  54.         virtual void SetTextPtr(Ptr textPtr, long numChars);
  55.         virtual void StopInlineSession(void);
  56.         virtual Handle GetTextHandle(void);
  57.         virtual Handle CopyTextRange(long start, long end);
  58.         void CopyRangeWithStyle(long start, long end, Handle hText,
  59.             StScrpHandle hStyles);
  60.         virtual void InsertTextPtr(Ptr text, long length, Boolean fRedraw);
  61.         void InsertWithStyle(Ptr text, long length, StScrpHandle hStyles,
  62.             Boolean fRedraw);
  63.         virtual void TypeChar(char theChar, short theModifers);
  64.  
  65.         // Calibrating
  66.         virtual void CalcWERects();
  67.         virtual void ResizeFrame(Rect *delta);
  68.         virtual void AdjustBounds();
  69.  
  70.         virtual long FindLine(long charPos);
  71.         virtual long GetLength();
  72.         
  73.         // Text Characteristics
  74.         virtual void SetFontNumber(short aFontNumber);
  75.         virtual void SetFontStyle(short aStyle);
  76.         virtual void SetFontSize(short aSize);
  77.         virtual void SetTextMode(short aMode);
  78.         virtual void SetAlignment(short anAlignment);
  79.         virtual void SetAlignCmd(long alignCmd);
  80.         virtual void SetSpacingCmd(long aSpacingCmd);
  81.         virtual void SetTheStyleScrap(long rangeStart, long rangeEnd,
  82.             StScrpHandle styleScrap, Boolean redraw);
  83.         virtual void SetStyle(short mode, TextStyle *newStyle, Boolean redraw);
  84.  
  85.         virtual long GetHeight(long startLine, long endLine);
  86.         virtual long GetCharOffset(LongPt *aPt);
  87.         virtual void GetCharPoint(long offset, LongPt *aPt);
  88.         virtual void GetTextStyle(short *whichAttributes, TextStyle *aStyle);
  89.         virtual void GetCharStyle(long charOffset, TextStyle *theStyle);
  90.         virtual long GetSpacingCmd();
  91.         virtual long GetAlignCmd();
  92.         virtual StScrpHandle GetTheStyleScrap();
  93.  
  94.         virtual long GetNumLines();
  95.         virtual void GetSelection(long *selStart, long *selEnd);
  96.         virtual void HideSelection(Boolean hide, Boolean redraw);
  97.         virtual void GetSteps(short *hStep, short *vStep);
  98.  
  99.         // Printing
  100.         virtual void AboutToPrint(short *firstPage, short *lastPage);
  101.         virtual void PrintPage(short pageNum, short pageWidth, short pageHeight,
  102.             CPrinter *aPRinter);
  103.         virtual void DonePrinting();
  104.  
  105.         // Cursor
  106.         virtual void Dawdle(long *maxSleep);
  107.  
  108.         // Object I/O
  109.         virtual void PutTo(CStream& stream);
  110.         virtual void GetFrom(CStream& stream);
  111. };
  112.